<template>
  <div class="school">
    <h2>学校名称:{{name}}</h2>
    <h2>学校地址:{{address}}</h2>
    <button @click="showMore">点击展示更多信息</button>
  </div>
</template>

<script>
  export default {
    name:'School',
    data(){
      return {
        name:'尚硅谷',
        address:'宏福科技园',
        city:'北京',
        tel:'000-112233'
      }
    },
    methods: {
      showMore(){
        return alert(`城市: ${this.city} ; 电话: ${this.tel}`)
      }
    },
  }
</script>

<style scoped>
  .school{
    background-color: rgb(89, 199, 86);
    padding: 20px;
  }
</style>